import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/login',
      component: resolve => require(['@/components/common/Login.vue'], resolve)
    },
    {
      path: '/main',
      component: resolve => require(['@/components/common/Main.vue'], resolve),
      children: [
        {
          path: '/',
          // component: resolve => require(['@/components/common/Home.vue'],resolve)
          // component: resolve => require(['@/components/map/RealTimeMap.vue'],resolve)
          component: resolve => require(['@/components/map/Map2.vue'],resolve)
        },
        {
          path: '/menu',
          component: resolve => require(['@/components/system/Menu.vue'],resolve)
        },
        {
          path: '/role',
          component: resolve => require(['@/components/system/Role.vue'],resolve)
        },
        {
          path: '/dept',
          component: resolve => require(['@/components/system/Dept.vue'],resolve)
        },
        {
          path: '/emp',
          component: resolve => require(['@/components/system/Emp.vue'],resolve)
        },
        {
          path: '/member',
          component: resolve => require(['@/components/system/Member.vue'],resolve)
        },
        {
          path: '/realTimeMap',
          component: resolve => require(['@/components/map/Map2.vue'],resolve)
        },
        {
          path: '/relay',
          component: resolve => require(['@/components/device/Relay.vue'],resolve)
        },
        {
          path: '/terminal',
          component: resolve => require(['@/components/device/Terminal.vue'],resolve)
        },
        {
          path: '/repair',
          component: resolve => require(['@/components/device/Repair.vue'],resolve)
        },
        {
          path: '/replace',
          component: resolve => require(['@/components/device/Replace.vue'],resolve)
        },
        {
          path: '/devChart',
          component: resolve => require(['@/components/device/DevChart.vue'],resolve)
        },
        {
          path: '/alarmList',
          component: resolve => require(['@/components/alarm/Alarm.vue'],resolve)
        },
        {
          path: '/currentParam',
          component: resolve => require(['@/components/alarm/CurrentParam.vue'],resolve)
        },
        {
          path: '/alarmChart',
          component: resolve => require(['@/components/alarm/AlarmChart.vue'],resolve)
        },
        {
          path: '/door',
          component: resolve => require(['@/components/doorAccess/Door.vue'],resolve)
        },
        {
          path: '/doorAccess',
          component: resolve => require(['@/components/doorAccess/DoorAccess.vue'],resolve)
        },
        {
          path: '/doorCard',
          component: resolve => require(['@/components/doorAccess/DoorCard.vue'],resolve)
        },
        {
          path: '/doorEvent',
          component: resolve => require(['@/components/doorAccess/DoorEvent.vue'],resolve)
        },
        {
          path: '/doorOpenTime',
          component: resolve => require(['@/components/doorAccess/OpenTime.vue'],resolve)
        },
      ]
    },
    
    
  ]
})

